package UserUI;

import loginUI.LoginFrame;
import userManageUI.ChangePassWordFrame;
import userManageUI.DepUserInfoFrame;
import courseManageUI.DepCourseInfoFrame;
import courseManageUI.ReleaseCourseFrame;
import frameUI.ModifyFrame;
import frameUI.PlanFrame;
import frameUI.ShowFrame;
import VO.UserVO;

public class DepAdmController {

	private static UserVO userVO;
	private static DepAdminFrame depAdminFrame;
	private static PlanFrame planFrame;
	private static ReleaseCourseFrame releaseCourseFrame;
	private static DepUserInfoFrame userInfoFrame;
	private static ChangePassWordFrame changePassWordFrame;
	private static ShowFrame showFrame;
	private static DepCourseInfoFrame courseInfoFrame;
	
	public DepAdmController(UserVO userVO){
		this.userVO = userVO;
		depAdminFrame = new DepAdminFrame(this.userVO);
		planFrame = new PlanFrame(this.userVO);
		releaseCourseFrame = new ReleaseCourseFrame(this.userVO);
		changePassWordFrame = new ChangePassWordFrame(this.userVO);
		showFrame = new ShowFrame(userVO);
	}
	public DepAdmController(){
		
	}
	
	public static void jumpTo(String frame){
		switch(frame){
		case"login":
			new LoginFrame().setVisible(true);break;
		case"main":
			depAdminFrame.setVisible(true);break;
		case"changePassWordFrame":
			changePassWordFrame.setVisible(true);break;
		case"plan":
			planFrame.setVisible(true);break;
		case"showFrame":
			showFrame.setVisible(true);break;
		case"releaseCourseFrame":
			releaseCourseFrame.setVisible(true);break;
		case"userInfoFrame":
			userInfoFrame = new DepUserInfoFrame(userVO);
			userInfoFrame.setVisible(true);break;
		case"courseInfoFrame":
			courseInfoFrame = new DepCourseInfoFrame(userVO);
			courseInfoFrame.setVisible(true);break;
		}
	}
}
